//
//  ZYAbstractFacMainPage.m
//  DesignMode
//
//  Created by wangzhipan on 2024/10/14.
//

#import "ZYAbstractFacMainPage.h"

@interface ZYAbstractFacMainPage()
@property (nonatomic, strong, nullable) id<IDBFactory> dbFactory;
@end

@implementation ZYAbstractFacMainPage
- (instancetype)initWithDbFactory:(id<IDBFactory>)dbFactory
{
    if (self = [super init]) {
        self.dbFactory = dbFactory;
    }
    return self;
}

- (void)setUp
{
    id<IDBConnect>connectOp = [self.dbFactory createDBConnect];
    [connectOp connect];
    
    id<IDBCommand>commandOp = [self.dbFactory createDBCommand];
    [commandOp insert];
    [commandOp deleteOne];
    
    id<IDBDataReader>readerOp = [self.dbFactory createDBDataReader];
    [readerOp query];
}
@end
